In conventional computer operating systems, library manager applications facilitate communication among client applications and removable storage devices. Removable storage devices are arranged by class and may include tape drives, disk drives (Zip drives, CD ROM, and optical disk drives) and changer libraries. Typically, each device class has an associated driver to control or regulate the device. Facilitating communication between the client application and removable storage devices includes having the library management application periodically poll the device drivers for state changes occurring with a particular device. Additionally, the library manager maintains a database that documents the location and identification for the removable devices.
When polling a device driver, the library manager typically receives a request to poll the drive from a client application. When the request is received by the library manager, the manager begins polling the device driver to determine if there has been a state change with the device. The device driver then determines the particular state of the drive and reports this information back to the library manager.
Several drawbacks exist in systems that utilize a library manager to poll for state changes in removable media. As mentioned above, the library manager begins polling only after receiving a request from one of its client applications. Thus, an event or a change may occur at a device without the library manager being notified of the event. For example, in tape drives, if the drive becomes dirty, client applications using that tape drive may detect that the drive is dirty, but do not notify the library manager of the condition. It is not until the library manager itself tries to use the tape drive that it knows that the drive is dirty. At that point, the library manager takes action to clean the drive. Thus, the library manager may miss events occurring at a device that may hinder the performance of the device.
The library manager performing the polling function for state changes presents another drawback because the library manager cannot poll the device when a client application is accessing the device. Library manager systems traditionally are used to detect media arriving and leaving a particular device. This typically occurs when client applications are not accessing the device. Thus, if an application is using the device and an event occurs, the library manager may not know of the event. For example, if the client application erases the content of the media in a device, the library manager would not know of the event.
The erasing function is one of several functions that changes the identification of the media. Current library manager systems fail to detect identification changes on the media. As mentioned above, the library manager maintains a database to monitor the identification of the media and device. Thus, if a client application alters the identification of the media without notifying the library manager, the library manager's database would not have accurate information which may lead to system failures when the library manager attempts to access the media at a subsequent time.
Utilizing a library manager to poll for device changes presents still another drawback because the library manager may miss events occurring at the device. For example, changer libraries include banks of multiple bays that contain the tape drives. The library has a door that is shut when the changer is in operation. An operator opens the changer door to access a particular bay to remove or add a tape into the drive. As noted above, in a typical operating system, the library manager includes a database with the information of the location of the particular drive within the changer library. If an operator were to open the door and remove a tape from one of the drives or move the tape from one drive to another, the library manager may not recognize the event. As mentioned above, the library manager only polls for state changes when a client application initiates the request. Thus, the library manager may not know when a tape has been removed or moved to another drive and the library manager's database would have inaccurate information. To maintain the integrity of the library manager database, the library changer doors are locked to prevent operators from moving the tapes to another drive or removing them completely. While this helps maintain the integrity of the database in the library manager, it is an inefficient solution.
As mentioned above, drivers are device specific. That is, each driver is associated with a certain class of devices. Sense codes are sent by the devices and are received by the drivers. The drivers can then interpret these codes to determine changes occurring at the device. Library managers do not receive all of the sense code data. Thus, managers may miss an event occurring at the device.
Accordingly, there exists a need to efficiently notify applications of state changes in removable devices. Moreover, there is a need for such a method and system that allows for device drivers to poll their associated devices and asynchronously notify applications of events occurring with the device.